<?php
require_once 'defs/constants.php';
include_once DIR_CLASSES.'measure_type.php';
include_once DIR_CLASSES.'status_volgnummer.php';


	
if ( isset($_POST) && isset($_POST['action']) ){
    
    // switch
    switch ($_POST['action']){
		/*new status */
        case 'new_status' :
            $status = new StatusVolgnummer();
            $status->setName($_POST['status']);
            $status->setDescription($_POST['status_desc']);
            $status->save();
            break;
        /*new meting*/
        case 'new_meting' :
            $meting = new MeasureType();
            $meting->setName($_POST['meting']);
            $meting->setDescription($_POST['meting_desc']);
            $meting->save();
            break;
}
}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml="nl"  lang="nl">


<head> 
<title>Status/Meting Beschrijving</title>
<link rel="stylesheet" type="text/css" href="styles/style.css" >
</head> 

<body>
<div id="wrapper">

&nbsp

<div id="status">
Status Beschrijving
             
				<?php include_once DIR_FO.'status_form.php'; ?>
					
 
</div>
<div id="status2">
Meting Beschrijving
             
				<?php include_once DIR_FO.'meting_form.php'; ?>
					
					
					&nbsp
</div>
<div id="status3">
Database Show             
			<?php include_once DIR_FO.'show_table_form.php';?>
					
					
					&nbsp
</div>

</div>
</body> 
</html>